package User;

import operation.*;

import java.util.Scanner;

public class Admin extends User{

    public Admin(String name) {//(1)
        super(name);//(2)
        this.iOperations = new IOperation[]{//(3)
                new ExitSystem(),
                new FindOperation(),
                new AddOperation(),
                new DeleteOperation(),
                new DisplayOperation()
        };
    }

    @Override
    public int menu() {//(4)
        System.out.println("欢迎"+this.name+"进入图书管理系统");
        System.out.println("0.退出图书管理系统");
        System.out.println("1.查阅图书");
        System.out.println("2.添加图书");
        System.out.println("3.删除图书");
        System.out.println("4.展示所有图书");
        Scanner scan = new Scanner(System.in);
        System.out.println("请选择:");
        int choice = scan.nextInt();
        return choice;
    }
}
